#include "Bumper.h"
bool Bumper::isTouching()
{
    int data;
    send(BUMPER);
    data = send(BUMPER);
    return isFrontTouching() || isBackTouching();
}
bool Bumper::isFrontTouching()
{
    int data;
    send(BUMPER);
    data = send(BUMPER);
    return  (data & 2) == 0;
}
bool Bumper::isBackTouching()
{
    int data;
    send(BUMPER);
    data = send(BUMPER);
    return (data & 1) == 0;
}
